# -*- coding: utf-8 -*-

from django.conf.urls.defaults import *

from wiki import views, models

# --- The urlconf of your project must be something like this:
#
#urlpatterns = patterns('',
#    (r'^mywiki/', include('wiki.urls')), # this file
#    (r'', include('wiki.static_urls')), # static files, testing only
#    (r'^wiki_admin/', include('wiki.admin_urls')) # newforms_admin
#)
#
# --- If you want groups of articles:
#
#from myproj.myapp import models
#urlpatterns = patterns('',
#    url(r'^(?P<group_slug>\w+)/wiki/', include('wiki.views'),
#        {'group_slug_field': 'slug',
#         'group_qs': models.MyGroup.objects.all()}),
#)
#
#

urlpatterns = patterns('',
    url(r'^$', views.article_list, name='wiki_index'),

    url(r'^list/$', views.article_list, name='wiki_article_list'),

    url(r'^search/$', views.search_article, name="wiki_search_article"),

    url(r'^recentchanges/$', views.recent_changes, name='wiki_recent_changes'),

    url(r'^(?P<title>\w+)/$', views.view_article, name='wiki_article'),

    url(r'^edit/(?P<title>\w+)/$', views.edit_article, name='wiki_edit_article'),

    url(r'observe/(?P<title>\w+)/$', views.observe_article, name='wiki_observe_article'),

    url(r'observe/(?P<title>\w+)/stop/$', views.stop_observing_article,
        name='wiki_stop_observing_article'),

    url(r'^history/(?P<title>\w+)/$', views.article_history, name='wiki_article_history'),

    url(r'^history/(?P<title>\w+)/changeset/(?P<revision>\d+)/$', views.view_changeset,
        name='wiki_changeset',),

    url(r'^history/(?P<title>\w+)/revert/$', views.revert_to_revision,
        name='wiki_revert_to_revision'),

)
